<template>
  <div>
    <el-carousel :interval="4000" type="card" height="200px">
      <el-carousel-item v-for="item in data" :key="data.id">
       <!-- <h3 class="medium">{{ item.id }}</h3> -->
        <img :src="item.photo" alt="图片" height="200px">
      </el-carousel-item>
    </el-carousel>

    <div class="card1">
      <el-card class="box-card">
        <div class="block">
          <el-timeline>
            <el-timeline-item timestamp="2021/6/29" placement="top">
              <el-card>
                <h4>商城上新，快来选购吧</h4>
                <p>张三 提交于 2021/6/29 20:46</p>
              </el-card>
            </el-timeline-item>
            <el-timeline-item timestamp="2021/6/28" placement="top">
              <el-card>
                <h4>商城上新，快来选购吧</h4>
                <p>张三 提交于 2021/6/28 21:46</p>
              </el-card>
            </el-timeline-item>
            <el-timeline-item timestamp="2021/6/28" placement="top">
              <el-card>
                <h4>系统维护和升级</h4>
                <p>王小虎 提交于 2021/6/27 20:46</p>
              </el-card>
            </el-timeline-item>
          </el-timeline>
        </div>
      </el-card>
    </div>
  </div>
</template>
<script>
  export default {
    name: 'AppIndex',
    data() {
      return {
        data: [{
            id: '1',
            photo: '/static/index/index5.png'
          },
          {
            id: '2',
            photo: '/static/index/index6.png'
          },
          {
            id: '3',
            photo: '/static/index/index7.png'
          },
          {
            id: '4',
            photo: '/static/index/index8.png'
          },
          {
            id: '5',
            photo: '/static/index/index9.png'
          },
          {
            id: '6',
            photo: '/static/index/index10.png'
          },
        ]
      }
    }
  }
</script>
<style>
  .el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 200px;
    margin: 0;
  }

  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }

  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }

  .box-card {
    width: 600px;
  }

  .card1 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
</style>
